package com.eight.cloud.upgrade.controller;

import com.eight.cloud.core.global.result.Result;
import com.eight.cloud.upgrade.service.IPermissionUpgradeService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 权限树跟新
 *
 * @ClassName: PermissionUpgradeController
 * @Author: TXC
 * @Date: 2025-02-14 15:44
 **/
@RestController
@RequestMapping("/upgrade/permission")
public class PermissionUpgradeController {

    @Resource
    private IPermissionUpgradeService permissionUpgradeService;
    @GetMapping("/flushPermission")
    public Result<?> flushPermission(String module) {
        permissionUpgradeService.flushPermission(module);
        return Result.ok();
    }

    @GetMapping("/initSystem")
    public Result<?> initSystem() {
        permissionUpgradeService.initSystem();
        return Result.ok();
    }
}
